package com.example.demo.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.entity.TSysRole;
import com.example.demo.service.TSysRoleService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 角色 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2020-02-27
 */
@RestController
@Api(value = "测试接口", tags = "TSysRoleController测试接口相关")
@RequestMapping("/role")
public class TSysRoleController {
	
	private static Logger log = LoggerFactory.getLogger(TSysRoleController.class);
	
	@Autowired
	private TSysRoleService tSysRoleService;
	
	
	@ApiOperation("根据id查询用户的接口")
    @ApiImplicitParam(name = "id", value = "用户id", defaultValue = "1", required = true)
	@GetMapping("/test")
	@ResponseBody
	public TSysRole test(@RequestParam("id")Long id) {
		log.info("访问了mybatis。/test 方法");
		return tSysRoleService.test(id);
	}

}

